package com.lagou.bean;

import com.lagou.service.HelloService;
import com.lagou.service.HiService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Component;

@Component
public class ConsumerComponent {

    @Reference(url = "dubbo://localhost:20886")
    private HelloService helloService;

    @Reference(url = "dubbo://localhost:20885")
    private HiService hiService;

    public String sayHello(String name) {
        return helloService.sayHello(name);
    }

    public String sayHi(String name) {
        return hiService.sayHi(name);
    }
}
